module Exoskeleton
  class Engine < Rails::Engine
    initializer 'exoskeleton_jst_processor', after: :load_environment_hook do |app|
      unless Rails.application.config.respond_to?(:exoskeleton_base)
        raise 'You must define `config.exoskeleton_base = \'YOUR_APP_NAME\'` in application.rb!'
      end

      Rails.application.assets.register_engine('.jst', MyJstProcessor)
    end
  end
end